package com.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("comment")
public class Comment {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    private Long articleId;
    
    private Long userId;
    
    private String content;
    
    private Long parentId;
    
    private Long replyToUserId;
    
    private Integer status;
    
    private LocalDateTime createTime;
    
    private LocalDateTime updateTime;
    
    @TableField(exist = false)
    private String username;
    
    @TableField(exist = false)
    private String avatar;
    
    @TableField(exist = false)
    private String replyToUsername;
    
    @TableField(exist = false)
    private List<Comment> children;
} 